package com.imooc.ecommerce.feign;

import com.imooc.ecommerce.vo.CommonResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 通过Sentinel对openFeign实现熔断降级
 * @author zhangshao
 * @since 2023/12/7 20:35
 */
@FeignClient(value = "e-commerce-imooc",fallback = SentinelFeignClientFallback.class)
public interface SentinelFeignClient {

    @GetMapping(value = "/qinyi")
    CommonResponse<String> getResultByFeign(@RequestParam  Integer code);
}
